package task

type Work struct {
	Name   string
	Data   Data
	finish chan struct{}
	fn     WorkFunHandler
}

func (w Work) Do() {
	<-w.finish
}

func (w Work) Result() Data {
	w.Do()
	return w.Data
}
